package com.example.studentalarm.bean;

import com.example.studentalarm.calendar.DateUtil;
import com.example.studentalarm.utils.TimeUtils;

import java.util.Date;


/**
 * 课表实体类
 */
public class TimetableBean {
    /**
     * 主键ID
     */
    private Integer id;
    /**
     * 课表名称
     */
    private String name;
    /***
     * 上课的时间
     */
    private Date time;
    /***
     * 上课的地址
     */
    private String address;
    /***
     * 备注
     */
    private String note;
    /***
     * 通知状态 1：已通知 0：未通知
     */
    private Integer alarmState = 0;
    /***
     * 提前多少分钟
     */
    private Integer minute;


    /***
     * 上课的日期
     */
    private String date;


    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Integer getMinute() {
        return minute;
    }

    public void setMinute(Integer minute) {
        this.minute = minute;
    }



    public Integer getAlarmState() {
        return alarmState;
    }

    public void setAlarmState(Integer alarmState) {
        this.alarmState = alarmState;
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
        this.setDate(TimeUtils.getDate("yyyy-M-d",time.getTime()));
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }


}
